using Grpc.Core;
using _8.GrpcServer;

namespace _8.GrpcServer.Services;

public class GreeterService1 : Greeter1.Greeter1Base
{
    private readonly ILogger<GreeterService1> _logger;

    public GreeterService1(ILogger<GreeterService1> logger)
    {
        _logger = logger;
    }

    public override Task<HelloReply> SayHello1(HelloRequest request, ServerCallContext context)
    {
        return Task.FromResult(new HelloReply() { Message = $"Hello1 {request.Name}" });
    }
    
}

public class GreeterService2 : Greeter2.Greeter2Base
{
    public override Task<HelloReply> SayHello2(HelloRequest request, ServerCallContext context)
    {
        return Task.FromResult(new HelloReply() { Message = $"Hello2 {request.Name}" });
    }
}